//
//  ZJHShakeDetailTableViewCell.m
//  KCZ_B段项目
//
//  Created by dllo on 15/11/4.
//  Copyright © 2015年 Sky. All rights reserved.
//

#import "ZJHShakeDetailTableViewCell.h"
#import "FitHeader.h"
#import <UIImageView+WebCache.h>
#import "FontSizeSingleTon.h"
#define Font [[FontSizeSingleTon shareFontSize]array]
@implementation ZJHShakeDetailTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createCell];
    }
    return self;
}
-(void)createCell
{
    _leftImageView = [[UIImageView alloc]init];
    [self.contentView addSubview:_leftImageView];
    
    _titleLable = [[UILabel alloc]init];
    _titleLable.font = [UIFont systemFontOfSize:[Font[0] integerValue]];
    [self.contentView addSubview:_titleLable];
    
    _materialLable = [[UILabel alloc]init];
    _materialLable.font = [UIFont systemFontOfSize:[Font[1] integerValue]];
    [self.contentView addSubview:_materialLable];
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _leftImageView.frame = CGRectMake(15 * wt, 15 * ht, 100 * wt, 60 * ht);
    _leftImageView.contentMode = UIViewContentModeScaleToFill;
    _titleLable.frame = CGRectMake(_leftImageView.frame.origin.x + _leftImageView.frame.size.width + 10 * wt, _leftImageView.frame.origin.y, 200 * wt, 20 * ht);
    _materialLable.frame = CGRectMake(_titleLable.frame.origin.x, _titleLable.frame.origin.y + _titleLable.frame.size.height + 20 * ht, 240 * wt, 15 * ht);
    
}
-(void)setShakeModel:(ZJHShakeModel *)shakeModel
{
    [_leftImageView sd_setImageWithURL:[NSURL URLWithString:shakeModel.Cover] placeholderImage:[UIImage imageNamed:@"10075"]];
    _titleLable.text = shakeModel.Title;
    _materialLable.text = shakeModel.Stuff;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
